# Generated by Django 3.0.3 on 2020-02-28 17:48

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(db_index=True, max_length=60)),
                ('slug', models.SlugField(max_length=60, unique=True)),
            ],
            options={
                'verbose_name': 'Категория',
                'verbose_name_plural': 'Категории',
                'ordering': ('title',),
            },
        ),
        migrations.CreateModel(
            name='CardProduct',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=200, verbose_name='Наименование товара')),
                ('description', models.TextField(verbose_name='Описание товара')),
                ('price', models.DecimalField(decimal_places=2, max_digits=7, verbose_name='Цена товара')),
                ('gender', models.CharField(choices=[('М', 'Мальчик'), ('Д', 'Девочка')], max_length=2, verbose_name='Пол ребёнка')),
                ('image', models.ImageField(blank=True, upload_to='%Y/%m/%d/', verbose_name='Фото товара')),
                ('size', models.CharField(choices=[('3T', '3 года'), ('4T', '4 года'), ('5T', '5 лет'), ('6T', '6 лет'), ('7T', '7 лет')], max_length=2, verbose_name='Размер')),
                ('slug', models.SlugField(max_length=60)),
                ('date_publish', models.DateField(auto_now_add=True)),
                ('date_update', models.DateField(auto_now=True)),
                ('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='products', to='general.Category')),
            ],
            options={
                'verbose_name': 'Карточка продукта',
                'verbose_name_plural': 'Карточка продукта',
                'ordering': ('title',),
                'index_together': {('id', 'slug')},
            },
        ),
    ]
